package com.shop.web.shiro.token;

import lombok.Data;
import org.apache.shiro.authc.UsernamePasswordToken;

@Data
public class BaseUsernamePasswordToken extends UsernamePasswordToken {

    private LoginTypeEnum loginTypeEnum;

    public BaseUsernamePasswordToken() {
        super();
    }

    public BaseUsernamePasswordToken(String username, String password, LoginTypeEnum loginTypeEnum, boolean rememberMe, String host) {
        super(username, password, rememberMe, host);
        this.loginTypeEnum = loginTypeEnum;
    }

    public BaseUsernamePasswordToken(String username) {
        super(username, "", false, null);
        this.loginTypeEnum = LoginTypeEnum.NO_PASSWORD;
    }

    public BaseUsernamePasswordToken(String username, String password) {
        super(username, password, false, null);
        this.loginTypeEnum = LoginTypeEnum.PASSWORD;
    }



}
